package org.huntaway.kindergarten.service.info;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.huntaway.kindergarten.manager.InDefineMng;
import org.huntaway.kindergarten.po.InDefine;
import org.huntaway.kindergarten.service.KindProcessor;
import org.huntaway.kindergarten.util.EnumUse;
import org.huntaway.kindergarten.util.GlobalCon;

public class InDefineService extends KindProcessor<InDefine> {
	public InDefineService() {
		super();
		baseMng = (InDefineMng) sm.getMng(GlobalCon.INDEFINE);
	}
	@Override
	public InDefine getObj() {
		// TODO Auto-generated method stub
		return new InDefine();
	}

	public ActionForward addProcess(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super
				.addProcess(mapping, form, request, response);
		item.setTCode(GlobalCon.INDEFINE_TITE);
		item.setIsuse(EnumUse.NO.getValue());
		dateManage.save(item);
		return serBean;
	}
	public ActionForward editProcess(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super
				.editProcess(mapping, form, request, response);
		dateManage.save(item);
		return serBean;
	}
}
